@import '../../styles/global.less';
.k-popconfirm {
  display: inline-block;
  position: relative;
}

.k-popconfirm-exit-done {
  display: none;
}

.k-popconfirm-content {
  min-width: 200px;
  // max-width: 300px;
  font-size: 12px;
  line-height: 1.5;
  position: absolute;
  z-index: 1001;
  .k-popconfirm-inner {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: @radius;
  }
  .k-popconfirm-inner-content {
    padding: 18px 18px 10px 18px;
    box-sizing: border-box;
    position: relative;
  }
  .k-icon {
    position: absolute;
    font-size: 18px;
    color: @warning;
    top: 19px;
  }
  .k-popconfirm-footer {
    text-align: right;
    padding-top: 10px;
  }
  .k-popconfirm-title {
    padding: 0 0 0 24px;
    font-size: 14px;
  }
  .k-popconfirm-arrow {
    position: absolute;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 19px;
    .k-popconfirm-arrow-content {
      background-color: #fff;
      transform: rotate(45deg);
      width: 12px;
      height: 12px;
    }
  }
  .k-popconfirm-footer {
    text-align: right;
    padding: 8px 16px 16px;
    .k-btn {
      margin-left: 10px;
    }
  }
  &[k-placement^=top] {
    .k-popconfirm-arrow {
      bottom: 3px;
      height: 9px;
      .k-popconfirm-arrow-content {
        box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
        margin-top: -15px;
      }
    }
    .k-popconfirm-inner {
      margin-bottom: 12px;
    }
  }
  &[k-placement=top] {
    .k-popconfirm-arrow {
      left: 50%;
      transform: translateX(-50%);
    }
  }
  &[k-placement=top-right] {
    .k-popconfirm-arrow {
      right: 10px;
    }
  }
  &[k-placement=top-left] {
    .k-popconfirm-arrow {
      left: 10px;
    }
  }
  &[k-placement^=bottom] {
    .k-popconfirm-arrow {
      top: 3px;
      height: 9px;
      .k-popconfirm-arrow-content {
        box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
        margin-bottom: -15px;
      }
    }
    .k-popconfirm-inner {
      margin-top: 12px;
    }
  }
  &[k-placement=bottom] {
    .k-popconfirm-arrow {
      left: 50%;
    }
  }
  &[k-placement=bottom-left] {
    .k-popconfirm-arrow {
      left: 10px;
    }
  }
  &[k-placement=bottom-right] {
    .k-popconfirm-arrow {
      right: 10px;
    }
  }
  &[k-placement^=left] {
    .k-popconfirm-arrow {
      right: 3px;
			width: 9px;
			height: 19px;
			.k-popconfirm-arrow-content {
				box-shadow: 2px -2px 5px rgba(0, 0, 0, 0.05);
				margin-left: -15px;
			}
    }
    .k-popconfirm-inner {
      margin-right: 12px;
    }
  }
  &[k-placement=left] {
    .k-popconfirm-arrow {
      top: 50%;
      transform: translateY(-50%);
    }
  }
  &[k-placement=left-bottom] {
    .k-popconfirm-arrow {
      bottom: 10px;
    }
  }
  &[k-placement=left-top] {
    .k-popconfirm-arrow {
      top: 10px;
    }
  }
  &[k-placement^=right] {
    .k-popconfirm-arrow {
      left: 3px;
			width: 9px;
			height: 19px;
			.k-popconfirm-arrow-content {
				box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.05);
				margin-right: -15px;
			}
    }
    .k-popconfirm-inner {
      margin-left: 12px;
    }
  }
  &[k-placement=right] {
    .k-popconfirm-arrow {
      top: 50%;
      transform: translateY(-50%);
    }
  }
  &[k-placement=right-top] {
    .k-popconfirm-arrow {
      top: 10px;
    }
  }
  &[k-placement=right-bottom] {
    .k-popconfirm-arrow {
      bottom: 10px;
    }
  }
}

@keyframes pop-zoom-in {
  from {
    opacity: 0;
    transform: scale(.8, .8);
  }
  to {
    opacity: 1;
    transform: scale(1, 1);
  }
}

@keyframes pop-zoom-out {
  from {
    opacity: 1;
    transform: scale(1, 1);
  }
  to {
    opacity: 0;
    transform: scale(.8, .8);
  }
}

.k-popconfirm-enter-active {
  // transform-origin: center bottom;
  animation: pop-zoom-in .3s;
}

.k-popconfirm-exit-active {
  // transform-origin: center bottom;
  animation: pop-zoom-out .3s;
}